<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="js/echarts.js" ></script>
	</head>
	<body>
		<div id="sales" style="width: 600px;height: 500px;"></div>
		<script>
			myCharts = echarts.init(document.getElementById("sales"));
			var option={
				title:{
					text:'产品销量',
					left:'center',
				},
				tooltip:{
					trigger:'item',
					formatter:'{a} <br/>{b}:{c}({d}%)'
				},
				legend:{
					orient:"vertical",
					left:'left',
					data:['鼠标','键盘','U盘','主板']
				},
				series:[
					{
						name:'销售商品',
						type:'pie',
						radius:['20%','60%'],
						data:[
						{value:300,name:'鼠标'},
						{value:600,name:'键盘'},
						{value:500,name:'U盘'},
						{value:200,name:'主板'},
						]
					}
				]
			};
			myCharts.setOption(option);
		</script>
	</body>
</html>
